<template>
  <div style="height: auto;verflow: auto;display: flex;flex-direction: column;border-right: 2px solid #f8f8f8;padding-right: 10px;">
    <div class="auto" v-for="type in allTypes" style="padding-left: 5px;margin-top: 5px;">
      <input class="magic-radio" type="radio" :value="type" :id="'querytypes-radio-'+$index" v-model="types" >
      <label :for="'querytypes-radio-'+$index">{{type.type}}</label>
    </div>
  </div>
</template>

<script>
import allData from './config'

export default {
  title: '综合查询类型',
  data () {
    return {
      allTypes: allData.allData,
      types: ''
    }
  },
  props: ['queryType'],
  watch: {
    'types' () {
      this.$emit('types-change', this.types)
    },
    'queryType' (val) {
      console.log('观察到业务类型变化', val)
      if (val) {
        this.types = val
        this.queryType = null
      }
    }
  }
}
</script>
